home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / mail / MailWatch.lha / MailWatch / Install_MailWatch < prev    next >
Encoding:
Text File  |  1997-08-01  |  7.0 KB  |  239 lines

  1. ;
  2. ;   $VER: MailWatch_Install 4.2 (1.8.97)
  3. ;
  4.  
  5. (complete 0)
  6.  
  7. (if (= (askchoice (prompt  "Which installation method should I use?")
  8.                   (help    (cat "This installation script supports two types of installation.\n\n"
  9.                                 "You can install into a single, newly created directory, "
  10.                                 "or you can start MailWatch every time your Amiga is booted."))
  11.                   (choices "Own directory" "Onto SYS:")
  12.                   (default 0)
  13.         ) 0)
  14.  
  15.     (
  16.  
  17.         (set #DEST_MAIN
  18.           (askdir (prompt  "Choose the path where the new drawer 'MailWatch' should be created.")
  19.                   (help    "In the chosen path, a new drawer named 'MailWatch' will be created, in which MailWatch and its files will be copied.")
  20.                   (default @default-dest)
  21.           )
  22.         )
  23.  
  24.         (set #DEST_MAIN (tackon #DEST_MAIN "MailWatch"))
  25.         (set #DEST_PREFS #DEST_MAIN)
  26.         (set #DEST_DOCS (tackon #DEST_MAIN "docs"))
  27.         (set #DEST_ICONS (tackon #DEST_MAIN "icons"))
  28.         (set #DEST_MODS (tackon #DEST_MAIN "modules"))
  29.  
  30.         (set @default-dest #DEST_MAIN)
  31.  
  32.         (makedir #DEST_MAIN
  33.           (help @makedir-help)
  34.           (infos)
  35.         )
  36.  
  37.      )
  38.  
  39.      (
  40.  
  41.         ;
  42.         ; This installs MailWatch etc. across the system disk
  43.         ;
  44.  
  45.         (set #DEST_MAIN  "SYS:WbStartup")
  46.         (set #DEST_PREFS "SYS:Prefs")
  47.         (set #DEST_MODS  "LIBS:mwModules")
  48.         (set #DEST_DOCS  "HELP:English/MailWatch")
  49.         (set #DEST_ICONS "ENVARC:MailWatch/Icons")
  50.  
  51.         (set @default-dest #DEST_MAIN)
  52.  
  53.      )
  54. )
  55.  
  56. (complete 10)
  57.  
  58. (copyfiles (prompt "Install the main program, MailWatch?")
  59.            (source "")
  60.            (choices "MailWatch")
  61.            (dest #DEST_MAIN)
  62.            (infos)
  63.            (confirm)
  64.            (help "I guess you want to install this, otherwise you wouldn't be running the install script :)")
  65. )
  66.  
  67. (complete 15)
  68.  
  69. (copyfiles (prompt "Install the preferences program, MailWatchPrefs?")
  70.            (source "")
  71.            (choices "MailWatchPrefs")
  72.            (dest #DEST_PREFS)
  73.            (infos)
  74.            (confirm)
  75.            (help "The preferences program is the only supported way of configuring MailWatch's behaviour. I recommend that you install it.")
  76. )
  77.  
  78. (complete 20)
  79.  
  80. (message (cat "MailWatchPrefs requires that 'button.gadget' be installed."
  81.               "\n\nIf you have ClassAct installed on your system, DO NOT "
  82.               "install the 'button.gadget' included with this release."
  83.               "\n\nThis script will check for the presence of an installed "
  84.               "ClassAct setup, and will not install the included 'button.gadget'"
  85.               "(which is ©CBM) over the top of it.")
  86.          (help (cat "ClassAct programs will not work properly with the CBM "
  87.                     "'button.gadget', but programs expecting to find the "
  88.                     "CBM 'button.gadget' will work properly with the ClassAct "
  89.                     "version."))
  90.          (all)
  91. )
  92.  
  93. (set #os_ver (getversion))
  94. (set #os_version (/ #os_ver 65536))
  95.  
  96. (if (< #os_version 39)
  97.     (set #DEST_CLASSESGADGETS
  98.         (askdir (prompt  "AmigaOS 2.x system - where are '#?.gadget' files normally installed?")
  99.                 (help    @askdir-help)
  100.                 (default "LIBS:Gadgets")
  101.         )
  102.     )
  103.     (set #DEST_CLASSESGADGETS "SYS:Classes/Gadgets/")
  104. )
  105.  
  106. (set #BG_NAME (tackon #DEST_CLASSESGADGETS "button.gadget"))
  107.  
  108. (set #bg_ver (getversion #BG_NAME))
  109. (set #bg_version (/ #bg_ver 65536))
  110.  
  111. (if (<> #bg_version 41)
  112.     (
  113.         (set #INSTALL_BG
  114.             (askchoice (prompt  "You don't seem to have ClassAct installed on your system. Therefore, you should install the included 'button.gadget'.")
  115.                        (help    #CHECKCA_HELP)
  116.                        (choices "Install CBM 'button.gadget'" "Do not install")
  117.                        (default 0)
  118.             )
  119.         )
  120.     )
  121.     (
  122.         (set #INSTALL_BG 1)
  123.         (message "You seem to have ClassAct installed on your system. Therefore, I will not overwrite the ClassAct 'button.gadget'." (all))
  124.     )
  125. )
  126.  
  127. (if (= #INSTALL_BG 0)
  128.         (copylib (prompt "Installing 'button.gadget'....")
  129.                  (help   @copylib-help)
  130.                  (source "classes/gadgets/button.gadget")
  131.                  (dest   #DEST_CLASSESGADGETS)
  132.                  (confirm)
  133.         )
  134. )
  135.  
  136. (copylib (prompt "Installing 'tabs.gadget'....")
  137.          (help   @copylib-help)
  138.          (source "classes/gadgets/tabs.gadget")
  139.          (dest   #DEST_CLASSESGADGETS)
  140.          (confirm)
  141. )
  142.  
  143. (complete 30)
  144.  
  145. (copyfiles (prompt "Install the external modules for MailWatch?")
  146.            (source "")
  147.            (choices "modules/")
  148.            (dest #DEST_MODS)
  149.            (confirm)
  150.            (help "You also need to install the external modules that MailWatch uses.")
  151. )
  152.  
  153. (complete 35)
  154.  
  155. (set #MWDF_TTYPE
  156.     (askchoice (prompt  "Which external GUI module should the program use initially?")
  157.                (help    "")
  158.                (choices "appicons.mwdf" "dummy.mwdf" "textreqs.mwdf")
  159.                (default 0)
  160.     )
  161. )
  162.  
  163. (select #MWDF_TTYPE
  164.     (set #MWDF_STR (tackon #DEST_MODS "appicons.mwdf"))
  165.     (set #MWDF_STR (tackon #DEST_MODS "dummy.mwdf"))
  166.     (set #MWDF_STR (tackon #DEST_MODS "textreqs.mwdf"))
  167. )
  168.  
  169. (tooltype
  170.     (dest (tackon #DEST_MAIN "MailWatch"))
  171.     (settooltype "MWDF" #MWDF_STR)
  172. )
  173.  
  174. (complete 37)
  175.  
  176. (set #MAKEPREFDIRS
  177.     (askbool (prompt "MailWatch stores its preferences, by default, in ENVARC:MailWatch/ and ENV:MailWatch/. Create these directories now?")
  178.              (default 1)
  179.              (help   "The preferences program will create these directories if they are needed.")
  180.     )
  181. )
  182.  
  183. (if (= #MAKEPREFDIRS 1)
  184.     (
  185.         (makedir "ENVARC:MailWatch")
  186.         (makedir "ENV:MailWatch")
  187.     )
  188. )
  189.  
  190. (complete 40)
  191.  
  192. (copyfiles (prompt "Install the documentation?")
  193.            (source "")
  194.            (choices "docs/")
  195.            (dest #DEST_DOCS)
  196.            (confirm)
  197.            (help "The documentation is in HTML form; you will need a HTML browser to read it.")
  198. )
  199.  
  200. (complete 80)
  201.  
  202. (set #MSG_DOICONS "Install the icons?")
  203.  
  204. (set #ICONS
  205.     (askchoice (prompt  "Which icons do you want to install to be used by MailWatch?")
  206.                (help    "There are MagicWB and NewIcons icons provided.\n\nThese are suggestions only; any icons can be used in the program.\n")
  207.                (choices "MagicWB" "NewIcons" "None")
  208.                (default 2)
  209.     )
  210. )
  211.  
  212. (if (= #ICONS 0)
  213.     (copyfiles (prompt  #MSG_DOICONS)
  214.                (source  "Icons/MagicWB/")
  215.                (dest #DEST_ICONS)
  216.                (pattern "#?")
  217.     )
  218. )
  219.  
  220. (if (= #ICONS 1)
  221.     (copyfiles (prompt  #MSG_DOICONS)
  222.                (source  "Icons/NewIcons/")
  223.                (dest #DEST_ICONS)
  224.                (pattern "#?")
  225.     )
  226. )
  227.  
  228. (message (cat "\n\n\nYou will need to run MailWatchPrefs, to save a "
  229.               "valid preferences file,\nbefore starting MailWatch. "
  230.               "Look at the documentation for more details.\n\n"
  231.               "Enjoy using MailWatch, and don't forget:\n\n\n"
  232.               "MailWatch is MAILWARE!\n\n")
  233.          (all)
  234. )
  235.  
  236. (complete 100)
  237. (exit)
  238.  
  239.